\(\int (a+i a \tan (c+d x)) \, dx\) [6]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 13, antiderivative size = 19 \[ \int (a+i a \tan (c+d x)) \, dx=a x-\frac {i a \log (\cos (c+d x))}{d} \]

[Out]

a*x-I*a*ln(cos(d*x+c))/d

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {3556} \[ \int (a+i a \tan (c+d x)) \, dx=a x-\frac {i a \log (\cos (c+d x))}{d} \]

[In]

Int[a + I*a*Tan[c + d*x],x]

[Out]

a*x - (I*a*Log[Cos[c + d*x]])/d

Rule 3556

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps \begin{align*} \text {integral}& = a x+(i a) \int \tan (c+d x) \, dx \\ & = a x-\frac {i a \log (\cos (c+d x))}{d} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.00 \[ \int (a+i a \tan (c+d x)) \, dx=a x-\frac {i a \log (\cos (c+d x))}{d} \]

[In]

Integrate[a + I*a*Tan[c + d*x],x]

[Out]

a*x - (I*a*Log[Cos[c + d*x]])/d

Maple [A] (verified)

Time = 0.06 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.21

method result size
default \(a x +\frac {i a \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{2 d}\) \(23\)
norman \(a x +\frac {i a \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{2 d}\) \(23\)
parallelrisch \(a x +\frac {i a \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{2 d}\) \(23\)
parts \(a x +\frac {i a \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{2 d}\) \(23\)
derivativedivides \(\frac {a \left (\frac {i \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{2}+\arctan \left (\tan \left (d x +c \right )\right )\right )}{d}\) \(28\)
risch \(-\frac {i a \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{d}-\frac {2 a c}{d}\) \(28\)

[In]

int(a+I*a*tan(d*x+c),x,method=_RETURNVERBOSE)

[Out]

a*x+1/2*I*a/d*ln(1+tan(d*x+c)^2)

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.95 \[ \int (a+i a \tan (c+d x)) \, dx=-\frac {i \, a \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right )}{d} \]

[In]

integrate(a+I*a*tan(d*x+c),x, algorithm="fricas")

[Out]

-I*a*log(e^(2*I*d*x + 2*I*c) + 1)/d

Sympy [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.26 \[ \int (a+i a \tan (c+d x)) \, dx=- \frac {i a \log {\left (e^{2 i d x} + e^{- 2 i c} \right )}}{d} \]

[In]

integrate(a+I*a*tan(d*x+c),x)

[Out]

-I*a*log(exp(2*I*d*x) + exp(-2*I*c))/d

Maxima [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.89 \[ \int (a+i a \tan (c+d x)) \, dx=a x + \frac {i \, a \log \left (\sec \left (d x + c\right )\right )}{d} \]

[In]

integrate(a+I*a*tan(d*x+c),x, algorithm="maxima")

[Out]

a*x + I*a*log(sec(d*x + c))/d

Giac [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.95 \[ \int (a+i a \tan (c+d x)) \, dx=a x - \frac {i \, a \log \left ({\left | \cos \left (d x + c\right ) \right |}\right )}{d} \]

[In]

integrate(a+I*a*tan(d*x+c),x, algorithm="giac")

[Out]

a*x - I*a*log(abs(cos(d*x + c)))/d

Mupad [B] (verification not implemented)

Time = 3.72 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.89 \[ \int (a+i a \tan (c+d x)) \, dx=\frac {a\,\ln \left (\mathrm {tan}\left (c+d\,x\right )+1{}\mathrm {i}\right )\,1{}\mathrm {i}}{d} \]

[In]

int(a + a*tan(c + d*x)*1i,x)

[Out]

(a*log(tan(c + d*x) + 1i)*1i)/d